﻿using EventBus;
using LiteStep.Currencies;
using LiteStep.Events;
using LiteStep.Exchanges.Vircurex;
using Newtonsoft.Json;
using RestSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LiteStep.DataSources.Vircurex
{
	public class VircurexRestApi : IDataSource
	{
		private RestClient restClient { get; set; }
		private IEventBus eventBus { get; set; }

		private bool running { get; set; }

		public VircurexRestApi(RestClient restClient, IEventBus eventBus)
		{
			LiteStep.Log.Debug("Creating VircurexRestApi");

			this.restClient = restClient;
			this.eventBus = eventBus;
			this.running = false;
		}

		~VircurexRestApi()
        {
			LiteStep.Log.Debug("Destroying VircurexRestApi");

            Stop();
        }

		public void Start(int seconds)
		{
			LiteStep.Log.Info("Starting VircurexRestApi");

			running = true;
            StartPollingForTickers(seconds);

            StartPollingForDepth(seconds);
		}

        public void StartPollingForTickers(int seconds)
        {
            running = true;
			ContinuouslyPollTickers(seconds);
        }

        public void StartPollingForDepth(int seconds)
        {
            running = true;
            ContinuouslyPollAltDepth<Btc>(seconds);
            ContinuouslyPollAltDepth<Bqc>(seconds);
            ContinuouslyPollAltDepth<Cnc>(seconds);
            ContinuouslyPollAltDepth<Dvc>(seconds);
            ContinuouslyPollAltDepth<Eur>(seconds);
            ContinuouslyPollAltDepth<Frc>(seconds);
            ContinuouslyPollAltDepth<Ftc>(seconds);
            ContinuouslyPollAltDepth<Ixc>(seconds);
            ContinuouslyPollAltDepth<Ltc>(seconds);
            ContinuouslyPollAltDepth<Nmc>(seconds);
            ContinuouslyPollAltDepth<Nvc>(seconds);
            ContinuouslyPollAltDepth<Ppc>(seconds);
            ContinuouslyPollAltDepth<Trc>(seconds);
            ContinuouslyPollAltDepth<Usd>(seconds);
            ContinuouslyPollAltDepth<Yac>(seconds);
        }

		public void Stop()
		{
			LiteStep.Log.Info("Stopping VircurexRestApi");

			running = false;
		}

		public async Task GetTickersAsync()
		{
			TickerResponse tickerResponse = null;

			try
			{
				FireBeforeTickerRequestEvents();
				tickerResponse = await restClient.GetResponseAsync<TickerResponse>("get_info_for_currency.json");
			}
			catch (Exception e)
			{
				LiteStep.Log.Error("There was an error retrieving the Vircurex tickers", e);
			}
			finally
			{
				FireAfterTickerResponseEvents(tickerResponse);
			}
		}

        public async Task GetAltDepthsAsync<T>() where T : ICurrency
        {
            AltDepthResponse<T> altDepthResponse = null;

            try
            {
                FireBeforeAltDepthRequestEvents<T>();
                altDepthResponse = await restClient.GetResponseAsync<AltDepthResponse<T>>(String.Format("orderbook_alt.json?alt={0}", typeof(T).Name.ToUpper()));
            }
            catch (Exception e)
            {
                LiteStep.Log.Error(String.Format("There was an error retrieving the Vircurex alt depths for {0}", typeof(T).Name), e);
            }
            finally
            {
                FireAfterAltDepthResponseEvents<T>(altDepthResponse);
            }
        }

        public async void ContinuouslyPollTickers(int seconds)
        {
            while (running)
            {
                await this.GetTickersAsync();
                await Task.Delay(seconds * 1000);
            }
        }

        public async void ContinuouslyPollAltDepth<T>(int seconds)
            where T : ICurrency
        {
            while (running)
            {
                await this.GetAltDepthsAsync<T>();
                await Task.Delay(seconds * 1000);
            }
        }

        public class RestClient : RestSharp.RestClient
        {
            private readonly string baseUrl;

            public RestClient(string baseUrl)
            {
                this.baseUrl = baseUrl;
            }

            public T GetResponse<T>(string resource, Method method = Method.GET)
            {
                var request = new RestRequest(Proxifier.Proxify(baseUrl + resource), method);
                var response = Execute(request);
                if (response.Content.Contains("error"))
                    throw new Exception("Response contained error: " + response.Content);
                return JsonConvert.DeserializeObject<T>(response.Content);
            }

            public Task<T> GetResponseAsync<T>(string resource, Method method = Method.GET)
            {
                return Task.Factory.StartNew(() => GetResponse<T>(resource, method));
            }
        }

        private class TickerResponse
        {
            [JsonProperty(PropertyName = "BTC")]
            public Tickers<Btc> BtcTickers { get; set; }
            [JsonProperty(PropertyName = "BQC")]
            public Tickers<Bqc> BqcTickers { get; set; }
            [JsonProperty(PropertyName = "CNC")]
            public Tickers<Cnc> CncTickers { get; set; }
            [JsonProperty(PropertyName = "DVC")]
            public Tickers<Dvc> DvcTickers { get; set; }
            [JsonProperty(PropertyName = "EUR")]
            public Tickers<Eur> EurTickers { get; set; }
            [JsonProperty(PropertyName = "FRC")]
            public Tickers<Frc> FrcTickers { get; set; }
            [JsonProperty(PropertyName = "FTC")]
            public Tickers<Ftc> FtcTickers { get; set; }
            [JsonProperty(PropertyName = "IXC")]
            public Tickers<Ixc> IxcTickers { get; set; }
            [JsonProperty(PropertyName = "LTC")]
            public Tickers<Ltc> LtcTickers { get; set; }
            [JsonProperty(PropertyName = "NMC")]
            public Tickers<Nmc> NmcTickers { get; set; }
            [JsonProperty(PropertyName = "NVC")]
            public Tickers<Nvc> NvcTickers { get; set; }
            [JsonProperty(PropertyName = "PPC")]
            public Tickers<Ppc> PpcTickers { get; set; }
            [JsonProperty(PropertyName = "TRC")]
            public Tickers<Trc> TrcTickers { get; set; }
            [JsonProperty(PropertyName = "USD")]
            public Tickers<Usd> UsdTickers { get; set; }
            [JsonProperty(PropertyName = "YAC")]
            public Tickers<Yac> YacTickers { get; set; }
        }

        private class Tickers<T>
            where T : ICurrency
        {
            [JsonProperty(PropertyName = "BTC")]
            public Ticker<T, Btc> BtcTicker { get; set; }
            [JsonProperty(PropertyName = "BQC")]
            public Ticker<T, Bqc> BqcTicker { get; set; }
            [JsonProperty(PropertyName = "CNC")]
            public Ticker<T, Cnc> CncTicker { get; set; }
            [JsonProperty(PropertyName = "DVC")]
            public Ticker<T, Dvc> DvcTicker { get; set; }
            [JsonProperty(PropertyName = "EUR")]
            public Ticker<T, Eur> EurTicker { get; set; }
            [JsonProperty(PropertyName = "FRC")]
            public Ticker<T, Frc> FrcTicker { get; set; }
            [JsonProperty(PropertyName = "FTC")]
            public Ticker<T, Ftc> FtcTicker { get; set; }
            [JsonProperty(PropertyName = "IXC")]
            public Ticker<T, Ixc> IxcTicker { get; set; }
            [JsonProperty(PropertyName = "LTC")]
            public Ticker<T, Ltc> LtcTicker { get; set; }
            [JsonProperty(PropertyName = "NMC")]
            public Ticker<T, Nmc> NmcTicker { get; set; }
            [JsonProperty(PropertyName = "NVC")]
            public Ticker<T, Nvc> NvcTicker { get; set; }
            [JsonProperty(PropertyName = "PPC")]
            public Ticker<T, Ppc> PpcTicker { get; set; }
            [JsonProperty(PropertyName = "TRC")]
            public Ticker<T, Trc> TrcTicker { get; set; }
            [JsonProperty(PropertyName = "USD")]
            public Ticker<T, Usd> UsdTicker { get; set; }
            [JsonProperty(PropertyName = "YAC")]
            public Ticker<T, Yac> YacTicker { get; set; }
        }

        private class AltDepthResponse<T>
            where T : ICurrency
        {
            [JsonProperty(PropertyName = "BTC")]
            public Depth<Btc, T> BtcDepth { get; set; }
            [JsonProperty(PropertyName = "BQC")]
            public Depth<Bqc, T> BqcDepth { get; set; }
            [JsonProperty(PropertyName = "CNC")]
            public Depth<Cnc, T> CncDepth { get; set; }
            [JsonProperty(PropertyName = "DVC")]
            public Depth<Dvc, T> DvcDepth { get; set; }
            [JsonProperty(PropertyName = "EUR")]
            public Depth<Eur, T> EurDepth { get; set; }
            [JsonProperty(PropertyName = "FRC")]
            public Depth<Frc, T> FrcDepth { get; set; }
            [JsonProperty(PropertyName = "FTC")]
            public Depth<Ftc, T> FtcDepth { get; set; }
            [JsonProperty(PropertyName = "IXC")]
            public Depth<Ixc, T> IxcDepth { get; set; }
            [JsonProperty(PropertyName = "LTC")]
            public Depth<Ltc, T> LtcDepth { get; set; }
            [JsonProperty(PropertyName = "NMC")]
            public Depth<Nmc, T> NmcDepth { get; set; }
            [JsonProperty(PropertyName = "NVC")]
            public Depth<Nvc, T> NvcDepth { get; set; }
            [JsonProperty(PropertyName = "PPC")]
            public Depth<Ppc, T> PpcDepth { get; set; }
            [JsonProperty(PropertyName = "TRC")]
            public Depth<Trc, T> TrcDepth { get; set; }
            [JsonProperty(PropertyName = "USD")]
            public Depth<Usd, T> UsdDepth { get; set; }
            [JsonProperty(PropertyName = "YAC")]
            public Depth<Yac, T> YacDepth { get; set; }
        }

		private void FireBeforeTickerRequestEvents()
		{
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Btc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Bqc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Cnc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Dvc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Eur, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Frc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ftc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ixc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ltc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nmc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Nvc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Ppc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Usd>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Trc, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Usd, Yac>>());

			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Btc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Bqc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Cnc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Dvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Eur>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Frc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Ftc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Ixc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Ltc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Nmc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Nvc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Ppc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Trc>>());
			eventBus.FireEvent(new BeforeTickerRequestEvent<Ticker<Yac, Usd>>());
		}

		private void FireAfterTickerResponseEvents(TickerResponse response)
		{
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Bqc>>(response != null && response.BtcTickers != null ? response.BtcTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Cnc>>(response != null && response.BtcTickers != null ? response.BtcTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Dvc>>(response != null && response.BtcTickers != null ? response.BtcTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Eur>>(response != null && response.BtcTickers != null ? response.BtcTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Frc>>(response != null && response.BtcTickers != null ? response.BtcTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Ftc>>(response != null && response.BtcTickers != null ? response.BtcTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Ixc>>(response != null && response.BtcTickers != null ? response.BtcTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Ltc>>(response != null && response.BtcTickers != null ? response.BtcTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Nmc>>(response != null && response.BtcTickers != null ? response.BtcTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Nvc>>(response != null && response.BtcTickers != null ? response.BtcTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Ppc>>(response != null && response.BtcTickers != null ? response.BtcTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Trc>>(response != null && response.BtcTickers != null ? response.BtcTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Usd>>(response != null && response.BtcTickers != null ? response.BtcTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Btc, Yac>>(response != null && response.BtcTickers != null ? response.BtcTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Btc>>(response != null && response.BqcTickers != null ? response.BqcTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Cnc>>(response != null && response.BqcTickers != null ? response.BqcTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Dvc>>(response != null && response.BqcTickers != null ? response.BqcTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Eur>>(response != null && response.BqcTickers != null ? response.BqcTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Frc>>(response != null && response.BqcTickers != null ? response.BqcTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Ftc>>(response != null && response.BqcTickers != null ? response.BqcTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Ixc>>(response != null && response.BqcTickers != null ? response.BqcTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Ltc>>(response != null && response.BqcTickers != null ? response.BqcTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Nmc>>(response != null && response.BqcTickers != null ? response.BqcTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Nvc>>(response != null && response.BqcTickers != null ? response.BqcTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Ppc>>(response != null && response.BqcTickers != null ? response.BqcTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Trc>>(response != null && response.BqcTickers != null ? response.BqcTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Usd>>(response != null && response.BqcTickers != null ? response.BqcTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Bqc, Yac>>(response != null && response.BqcTickers != null ? response.BqcTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Btc>>(response != null && response.CncTickers != null ? response.CncTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Bqc>>(response != null && response.CncTickers != null ? response.CncTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Dvc>>(response != null && response.CncTickers != null ? response.CncTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Eur>>(response != null && response.CncTickers != null ? response.CncTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Frc>>(response != null && response.CncTickers != null ? response.CncTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Ftc>>(response != null && response.CncTickers != null ? response.CncTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Ixc>>(response != null && response.CncTickers != null ? response.CncTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Ltc>>(response != null && response.CncTickers != null ? response.CncTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Nmc>>(response != null && response.CncTickers != null ? response.CncTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Nvc>>(response != null && response.CncTickers != null ? response.CncTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Ppc>>(response != null && response.CncTickers != null ? response.CncTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Trc>>(response != null && response.CncTickers != null ? response.CncTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Usd>>(response != null && response.CncTickers != null ? response.CncTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Cnc, Yac>>(response != null && response.CncTickers != null ? response.CncTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Btc>>(response != null && response.DvcTickers != null ? response.DvcTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Bqc>>(response != null && response.DvcTickers != null ? response.DvcTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Cnc>>(response != null && response.DvcTickers != null ? response.DvcTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Eur>>(response != null && response.DvcTickers != null ? response.DvcTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Frc>>(response != null && response.DvcTickers != null ? response.DvcTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Ftc>>(response != null && response.DvcTickers != null ? response.DvcTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Ixc>>(response != null && response.DvcTickers != null ? response.DvcTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Ltc>>(response != null && response.DvcTickers != null ? response.DvcTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Nmc>>(response != null && response.DvcTickers != null ? response.DvcTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Nvc>>(response != null && response.DvcTickers != null ? response.DvcTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Ppc>>(response != null && response.DvcTickers != null ? response.DvcTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Trc>>(response != null && response.DvcTickers != null ? response.DvcTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Usd>>(response != null && response.DvcTickers != null ? response.DvcTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Dvc, Yac>>(response != null && response.DvcTickers != null ? response.DvcTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Btc>>(response != null && response.EurTickers != null ? response.EurTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Bqc>>(response != null && response.EurTickers != null ? response.EurTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Cnc>>(response != null && response.EurTickers != null ? response.EurTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Dvc>>(response != null && response.EurTickers != null ? response.EurTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Frc>>(response != null && response.EurTickers != null ? response.EurTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Ftc>>(response != null && response.EurTickers != null ? response.EurTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Ixc>>(response != null && response.EurTickers != null ? response.EurTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Ltc>>(response != null && response.EurTickers != null ? response.EurTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Nmc>>(response != null && response.EurTickers != null ? response.EurTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Nvc>>(response != null && response.EurTickers != null ? response.EurTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Ppc>>(response != null && response.EurTickers != null ? response.EurTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Trc>>(response != null && response.EurTickers != null ? response.EurTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Usd>>(response != null && response.EurTickers != null ? response.EurTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Eur, Yac>>(response != null && response.EurTickers != null ? response.EurTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Btc>>(response != null && response.FrcTickers != null ? response.FrcTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Bqc>>(response != null && response.FrcTickers != null ? response.FrcTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Cnc>>(response != null && response.FrcTickers != null ? response.FrcTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Dvc>>(response != null && response.FrcTickers != null ? response.FrcTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Eur>>(response != null && response.FrcTickers != null ? response.FrcTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Ftc>>(response != null && response.FrcTickers != null ? response.FrcTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Ixc>>(response != null && response.FrcTickers != null ? response.FrcTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Ltc>>(response != null && response.FrcTickers != null ? response.FrcTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Nmc>>(response != null && response.FrcTickers != null ? response.FrcTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Nvc>>(response != null && response.FrcTickers != null ? response.FrcTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Ppc>>(response != null && response.FrcTickers != null ? response.FrcTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Trc>>(response != null && response.FrcTickers != null ? response.FrcTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Usd>>(response != null && response.FrcTickers != null ? response.FrcTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Frc, Yac>>(response != null && response.FrcTickers != null ? response.FrcTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Btc>>(response != null && response.FtcTickers != null ? response.FtcTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Bqc>>(response != null && response.FtcTickers != null ? response.FtcTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Cnc>>(response != null && response.FtcTickers != null ? response.FtcTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Dvc>>(response != null && response.FtcTickers != null ? response.FtcTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Eur>>(response != null && response.FtcTickers != null ? response.FtcTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Frc>>(response != null && response.FtcTickers != null ? response.FtcTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Ixc>>(response != null && response.FtcTickers != null ? response.FtcTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Ltc>>(response != null && response.FtcTickers != null ? response.FtcTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Nmc>>(response != null && response.FtcTickers != null ? response.FtcTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Nvc>>(response != null && response.FtcTickers != null ? response.FtcTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Ppc>>(response != null && response.FtcTickers != null ? response.FtcTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Trc>>(response != null && response.FtcTickers != null ? response.FtcTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Usd>>(response != null && response.FtcTickers != null ? response.FtcTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ftc, Yac>>(response != null && response.FtcTickers != null ? response.FtcTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Btc>>(response != null && response.IxcTickers != null ? response.IxcTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Bqc>>(response != null && response.IxcTickers != null ? response.IxcTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Cnc>>(response != null && response.IxcTickers != null ? response.IxcTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Dvc>>(response != null && response.IxcTickers != null ? response.IxcTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Eur>>(response != null && response.IxcTickers != null ? response.IxcTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Frc>>(response != null && response.IxcTickers != null ? response.IxcTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Ftc>>(response != null && response.IxcTickers != null ? response.IxcTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Ltc>>(response != null && response.IxcTickers != null ? response.IxcTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Nmc>>(response != null && response.IxcTickers != null ? response.IxcTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Nvc>>(response != null && response.IxcTickers != null ? response.IxcTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Ppc>>(response != null && response.IxcTickers != null ? response.IxcTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Trc>>(response != null && response.IxcTickers != null ? response.IxcTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Usd>>(response != null && response.IxcTickers != null ? response.IxcTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ixc, Yac>>(response != null && response.IxcTickers != null ? response.IxcTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Btc>>(response != null && response.LtcTickers != null ? response.LtcTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Bqc>>(response != null && response.LtcTickers != null ? response.LtcTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Cnc>>(response != null && response.LtcTickers != null ? response.LtcTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Dvc>>(response != null && response.LtcTickers != null ? response.LtcTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Eur>>(response != null && response.LtcTickers != null ? response.LtcTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Frc>>(response != null && response.LtcTickers != null ? response.LtcTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Ftc>>(response != null && response.LtcTickers != null ? response.LtcTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Ixc>>(response != null && response.LtcTickers != null ? response.LtcTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Nmc>>(response != null && response.LtcTickers != null ? response.LtcTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Nvc>>(response != null && response.LtcTickers != null ? response.LtcTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Ppc>>(response != null && response.LtcTickers != null ? response.LtcTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Trc>>(response != null && response.LtcTickers != null ? response.LtcTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Usd>>(response != null && response.LtcTickers != null ? response.LtcTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ltc, Yac>>(response != null && response.LtcTickers != null ? response.LtcTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Btc>>(response != null && response.NmcTickers != null ? response.NmcTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Bqc>>(response != null && response.NmcTickers != null ? response.NmcTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Cnc>>(response != null && response.NmcTickers != null ? response.NmcTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Dvc>>(response != null && response.NmcTickers != null ? response.NmcTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Eur>>(response != null && response.NmcTickers != null ? response.NmcTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Frc>>(response != null && response.NmcTickers != null ? response.NmcTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Ftc>>(response != null && response.NmcTickers != null ? response.NmcTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Ixc>>(response != null && response.NmcTickers != null ? response.NmcTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Ltc>>(response != null && response.NmcTickers != null ? response.NmcTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Nvc>>(response != null && response.NmcTickers != null ? response.NmcTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Ppc>>(response != null && response.NmcTickers != null ? response.NmcTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Trc>>(response != null && response.NmcTickers != null ? response.NmcTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Usd>>(response != null && response.NmcTickers != null ? response.NmcTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nmc, Yac>>(response != null && response.NmcTickers != null ? response.NmcTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Btc>>(response != null && response.NvcTickers != null ? response.NvcTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Bqc>>(response != null && response.NvcTickers != null ? response.NvcTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Cnc>>(response != null && response.NvcTickers != null ? response.NvcTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Dvc>>(response != null && response.NvcTickers != null ? response.NvcTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Eur>>(response != null && response.NvcTickers != null ? response.NvcTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Frc>>(response != null && response.NvcTickers != null ? response.NvcTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Ftc>>(response != null && response.NvcTickers != null ? response.NvcTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Ixc>>(response != null && response.NvcTickers != null ? response.NvcTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Ltc>>(response != null && response.NvcTickers != null ? response.NvcTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Nmc>>(response != null && response.NvcTickers != null ? response.NvcTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Ppc>>(response != null && response.NvcTickers != null ? response.NvcTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Trc>>(response != null && response.NvcTickers != null ? response.NvcTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Usd>>(response != null && response.NvcTickers != null ? response.NvcTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Nvc, Yac>>(response != null && response.NvcTickers != null ? response.NvcTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Btc>>(response != null && response.PpcTickers != null ? response.PpcTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Bqc>>(response != null && response.PpcTickers != null ? response.PpcTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Cnc>>(response != null && response.PpcTickers != null ? response.PpcTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Dvc>>(response != null && response.PpcTickers != null ? response.PpcTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Eur>>(response != null && response.PpcTickers != null ? response.PpcTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Frc>>(response != null && response.PpcTickers != null ? response.PpcTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Ftc>>(response != null && response.PpcTickers != null ? response.PpcTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Ixc>>(response != null && response.PpcTickers != null ? response.PpcTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Ltc>>(response != null && response.PpcTickers != null ? response.PpcTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Nmc>>(response != null && response.PpcTickers != null ? response.PpcTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Nvc>>(response != null && response.PpcTickers != null ? response.PpcTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Trc>>(response != null && response.PpcTickers != null ? response.PpcTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Usd>>(response != null && response.PpcTickers != null ? response.PpcTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Ppc, Yac>>(response != null && response.PpcTickers != null ? response.PpcTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Btc>>(response != null && response.TrcTickers != null ? response.TrcTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Bqc>>(response != null && response.TrcTickers != null ? response.TrcTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Cnc>>(response != null && response.TrcTickers != null ? response.TrcTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Dvc>>(response != null && response.TrcTickers != null ? response.TrcTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Eur>>(response != null && response.TrcTickers != null ? response.TrcTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Frc>>(response != null && response.TrcTickers != null ? response.TrcTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Ftc>>(response != null && response.TrcTickers != null ? response.TrcTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Ixc>>(response != null && response.TrcTickers != null ? response.TrcTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Ltc>>(response != null && response.TrcTickers != null ? response.TrcTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Nmc>>(response != null && response.TrcTickers != null ? response.TrcTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Nvc>>(response != null && response.TrcTickers != null ? response.TrcTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Ppc>>(response != null && response.TrcTickers != null ? response.TrcTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Usd>>(response != null && response.TrcTickers != null ? response.TrcTickers.UsdTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Trc, Yac>>(response != null && response.TrcTickers != null ? response.TrcTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Btc>>(response != null && response.UsdTickers != null ? response.UsdTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Bqc>>(response != null && response.UsdTickers != null ? response.UsdTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Cnc>>(response != null && response.UsdTickers != null ? response.UsdTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Dvc>>(response != null && response.UsdTickers != null ? response.UsdTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Eur>>(response != null && response.UsdTickers != null ? response.UsdTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Frc>>(response != null && response.UsdTickers != null ? response.UsdTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Ftc>>(response != null && response.UsdTickers != null ? response.UsdTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Ixc>>(response != null && response.UsdTickers != null ? response.UsdTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Ltc>>(response != null && response.UsdTickers != null ? response.UsdTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Nmc>>(response != null && response.UsdTickers != null ? response.UsdTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Nvc>>(response != null && response.UsdTickers != null ? response.UsdTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Ppc>>(response != null && response.UsdTickers != null ? response.UsdTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Trc>>(response != null && response.UsdTickers != null ? response.UsdTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Usd, Yac>>(response != null && response.UsdTickers != null ? response.UsdTickers.YacTicker : null));

			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Btc>>(response != null && response.YacTickers != null ? response.YacTickers.BtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Bqc>>(response != null && response.YacTickers != null ? response.YacTickers.BqcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Cnc>>(response != null && response.YacTickers != null ? response.YacTickers.CncTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Dvc>>(response != null && response.YacTickers != null ? response.YacTickers.DvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Eur>>(response != null && response.YacTickers != null ? response.YacTickers.EurTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Frc>>(response != null && response.YacTickers != null ? response.YacTickers.FrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Ftc>>(response != null && response.YacTickers != null ? response.YacTickers.FtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Ixc>>(response != null && response.YacTickers != null ? response.YacTickers.IxcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Ltc>>(response != null && response.YacTickers != null ? response.YacTickers.LtcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Nmc>>(response != null && response.YacTickers != null ? response.YacTickers.NmcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Nvc>>(response != null && response.YacTickers != null ? response.YacTickers.NvcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Ppc>>(response != null && response.YacTickers != null ? response.YacTickers.PpcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Trc>>(response != null && response.YacTickers != null ? response.YacTickers.TrcTicker : null));
			eventBus.FireEvent(new AfterTickerResponseEvent<Ticker<Yac, Usd>>(response != null && response.YacTickers != null ? response.YacTickers.UsdTicker : null));
		}

        private void FireBeforeAltDepthRequestEvents<T>()
            where T : ICurrency
        {
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Btc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Bqc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Cnc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Dvc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Eur, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Frc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Ftc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Ixc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Ltc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Nmc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Nvc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Ppc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Trc, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Usd, T>>());
            eventBus.FireEvent(new BeforeDepthRequestEvent<Depth<Yac, T>>());
        }

        private void FireAfterAltDepthResponseEvents<T>(AltDepthResponse<T> response)
            where T : ICurrency
        {
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Btc, T>>(response != null ? response.BtcDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Bqc, T>>(response != null ? response.BqcDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Cnc, T>>(response != null ? response.CncDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Dvc, T>>(response != null ? response.DvcDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Eur, T>>(response != null ? response.EurDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Frc, T>>(response != null ? response.FrcDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Ftc, T>>(response != null ? response.FtcDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Ixc, T>>(response != null ? response.IxcDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Ltc, T>>(response != null ? response.LtcDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Nmc, T>>(response != null ? response.NmcDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Nvc, T>>(response != null ? response.NvcDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Ppc, T>>(response != null ? response.PpcDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Trc, T>>(response != null ? response.TrcDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Usd, T>>(response != null ? response.UsdDepth : null));
            eventBus.FireEvent(new AfterDepthResponseEvent<Depth<Yac, T>>(response != null ? response.YacDepth : null));
        }
	}
}
